﻿// <copyright file="TelegramReceivedEventArgs.cs" company="Hallvard Korsgaard">
//  Microsoft Public License (Ms-PL). See license details here: http://enoceannet.codeplex.com/license
// </copyright>
// <author>Hallvard Korsgaard</author>

namespace EnOceanReceiver
{
  using System;
  using EnOcean;

  /// <summary>
  ///  Provides data for the TelegramReceived event.
  /// </summary>
  public class TelegramReceivedEventArgs : EventArgs
  {
    /// <summary>
    /// Initializes a new instance of the TelegramReceivedEventArgs class.
    /// </summary>
    /// <param name="telegram">The received telegram.</param>
    /// <param name="timestamp">The time the telegram was received.</param>
    internal TelegramReceivedEventArgs(Telegram telegram, DateTimeOffset timestamp)
    {
      this.Telegram = telegram;
      this.Timestamp = timestamp;
    }

    /// <summary>
    /// Gets the received telegram.
    /// </summary>
    public Telegram Telegram
    {
      get;
      private set;
    }

    /// <summary>
    /// Gets the time the telegram was received.
    /// </summary>
    public DateTimeOffset Timestamp
    {
      get;
      private set;
    }
  }
}
